
def twoSum( nums, target: int) :
        map_a = dict()
        for i in range(0, len(nums)):
            temp = target - nums[i]
            if temp in map_a:
                return [map_a[temp], i]
            map_a[nums[i]] = i

if __name__ == '__main__':
    nums = [2, 7, 11, 15]
    target = 9
    twoSum(nums=nums,target=target)

